package cn.hnucm.userservice.service.impl;

import cn.hnucm.userservice.entity.PayMessage;
import cn.hnucm.userservice.mapper.TbUserBasisMapper;
import cn.hnucm.userservice.service.TbUserBasisService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import cn.hnucm.userservice.entity.TbUserBasis;

import java.util.List;


/**
 * <p>
 * 用户基础信息表 服务实现类
 * </p>
 *
 * @author zjl
 * @since 2021-12-08
 */
@Service
public class TbUserBasisServiceImpl implements TbUserBasisService {

    @Autowired
    TbUserBasisMapper tbUserBasisMapper;

    @Override
    public List<TbUserBasis> findTbUserBasisById(int userId) {
        return tbUserBasisMapper.findTbUserBasisById(userId);
    }

    @Override
    public boolean addTbUserBasis(TbUserBasis tbUserBasis) {
        return tbUserBasisMapper.addTbUserBasis(tbUserBasis);
    }

    @Override
    public boolean updateTbUserBasis(TbUserBasis tbUserBasis) {
        return tbUserBasisMapper.updateTbUserBasis(tbUserBasis);
    }

    @Override
    public boolean deleteTbUserBasis(int userId) {
        return tbUserBasisMapper.deleteTbUserBasis(userId);
    }

    @Override
    public List<PayMessage> getPayMessage(int userId) {
        return tbUserBasisMapper.getPayMessage(userId);
    }

    @Override
    public boolean updateAssertById(int userId, Float userAsset) {
        return tbUserBasisMapper.updateAssertById(userId, userAsset);
    }
}
